package com.ruoyi.question_details.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.question_details.mapper.QuestionDetailsMapper;
import com.ruoyi.question_details.domain.QuestionDetails;
import com.ruoyi.question_details.service.IQuestionDetailsService;

/**
 * 试题详情Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-11-30
 */
@Service
public class QuestionDetailsServiceImpl implements IQuestionDetailsService 
{
    @Autowired
    private QuestionDetailsMapper questionDetailsMapper;

    /**
     * 查询试题详情
     * 
     * @param id 试题详情主键
     * @return 试题详情
     */
    @Override
    public QuestionDetails selectQuestionDetailsById(Long id)
    {
        return questionDetailsMapper.selectQuestionDetailsById(id);
    }

    /**
     * 查询试题详情列表
     * 
     * @param questionDetails 试题详情
     * @return 试题详情
     */
    @Override
    public List<QuestionDetails> selectQuestionDetailsList(QuestionDetails questionDetails)
    {
        return questionDetailsMapper.selectQuestionDetailsList(questionDetails);
    }

    /**
     * 新增试题详情
     * 
     * @param questionDetails 试题详情
     * @return 结果
     */
    @Override
    public int insertQuestionDetails(QuestionDetails questionDetails)
    {
        return questionDetailsMapper.insertQuestionDetails(questionDetails);
    }

    /**
     * 修改试题详情
     * 
     * @param questionDetails 试题详情
     * @return 结果
     */
    @Override
    public int updateQuestionDetails(QuestionDetails questionDetails)
    {
        return questionDetailsMapper.updateQuestionDetails(questionDetails);
    }

    /**
     * 批量删除试题详情
     * 
     * @param ids 需要删除的试题详情主键
     * @return 结果
     */
    @Override
    public int deleteQuestionDetailsByIds(Long[] ids)
    {
        return questionDetailsMapper.deleteQuestionDetailsByIds(ids);
    }

    /**
     * 删除试题详情信息
     * 
     * @param id 试题详情主键
     * @return 结果
     */
    @Override
    public int deleteQuestionDetailsById(Long id)
    {
        return questionDetailsMapper.deleteQuestionDetailsById(id);
    }
}
